﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DangKi.aspx.cs" Inherits="DangKi" %>
<%@ Register TagPrefix="recaptcha" Namespace="Recaptcha" Assembly="Recaptcha" %>


<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script type="text/javascript">
        function RefreshCaptcha() {
            var img = document.getElementById("imgCaptcha");
            img.src = "Handler.ashx?query=" + Math.random();
          
        }
</script>
    <style>
        /*div#dk
        {
            
          
            position: fixed;
            top:50%;
            left:50%;
            margin-top:-200px;
            margin-left:-300px;
           height:400px;
           width:600px;
           }*/

        .auto-style1
        {
        }

        .auto-style2
        {
            width: 165px;
        }
        .auto-style3
        {
            width: 165px;
            height: 23px;
        }
        .auto-style4
        {
            height: 23px;
        }

        .auto-style5
        {
            height: 24px;
        }

        .auto-style6
        {
            width: 165px;
            height: 2px;
        }
        .auto-style7
        {
            height: 2px;
        }

    </style>
</head>
<body>

    <form id="form1" runat="server">
    <div><div id="dk">
        <div style="text-align:center; font-size: xx-large; color: #FFFFFF; background-color: #0066FF;" >
            Đăng kí thành viên mới</div>
        <div>
            <table style="width:100%;">
                <%--<tr>
                    <td class="auto-style5" colspan="2" style="font-size: large; background-color: #CCFFFF">
                       
                        Nếu bạn đã có tài khoản,vui lòng
                        <asp:Button ID="btnDangNhap" runat="server" BackColor="#FFCC99" ForeColor="Black" Height="29px" Text="Đăng Nhập" Width="101px" CausesValidation="False" OnClick="btnDangNhap_Click1"/>
                       
                    </td>
                </tr>--%>
                <tr>
                    <td class="auto-style1" colspan="2">
                         <asp:Label ID="lblThongBao" runat="server" Font-Size="X-Large" ForeColor="Red" Text="Đăng kí thất bại" Visible="False"></asp:Label>
                        <asp:Label ID="lblThongBao2" runat="server" Font-Size="X-Large" ForeColor="Lime" Text="Bạn đã đăng kí thành công" Visible="False"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="auto-style1" colspan="2">
                        <h2 class="subheader" style="font-size: large">Thông tin tài khoản</h2></td>
                </tr>
                <tr>
                    <td class="auto-style2">Tên đăng nhập</td>
                    <td>
                        <asp:TextBox ID="txtTenDN" runat="server" Width="200px"></asp:TextBox>
                    
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtTenDN" ErrorMessage="Chưa nhập" ForeColor="Red">(*)</asp:RequiredFieldValidator>
                    
                        <asp:Label ID="lblKtraDN" runat="server" ForeColor="Red" Text="Tài khoản đã tồn tại" Visible="False"></asp:Label>
                    
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator5" runat="server" ControlToValidate="txtTenDN" ErrorMessage="Độ dài tên" ForeColor="Red" ValidationExpression="[a-zA-Z]\w{6,32}">&gt;6 kí tự và không chứa kí tự đặc biệt,khoảng trắng,kí tự đầu không là số</asp:RegularExpressionValidator>
                    
                    </td>
                </tr>
                <tr>
                    <td class="auto-style3">Mật khẩu</td>
                    <td class="auto-style4">
                        <asp:TextBox ID="txtMK1" runat="server" TextMode="Password" Width="200px"></asp:TextBox>
                    
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtMK1" ErrorMessage="Chưa nhập" ForeColor="Red">(*)</asp:RequiredFieldValidator>
                    
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" ControlToValidate="txtMK1" ErrorMessage="Độ dài pass" ForeColor="Red" ValidationExpression="\w{6,32}">&gt;6 kí tự</asp:RegularExpressionValidator>
                    </td>
                </tr>
                <tr>
                    <td class="auto-style2">Nhập lại mật khẩu</td>
                    <td>
                        <asp:TextBox ID="txtMK2" runat="server" TextMode="Password" Width="200px"></asp:TextBox>
                    
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="txtMK2" ErrorMessage="Chưa nhập" ForeColor="Red">(*)</asp:RequiredFieldValidator>
                    
                        <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToCompare="txtMK1" ControlToValidate="txtMK2" ErrorMessage="Không khớp" ForeColor="Red">Không trùng khớp</asp:CompareValidator>
                    </td>
                </tr>
                <tr>
                    <td class="auto-style2">Email</td>
                    <td>
                        <asp:TextBox ID="txtEmail" runat="server" Width="200px"></asp:TextBox>
                    
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtEmail" ErrorMessage="Chưa nhập" ForeColor="Red">(*)</asp:RequiredFieldValidator>
                    
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtEmail" ErrorMessage="RegularExpressionValidator" ForeColor="Red" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">Không đúng định đạng Email</asp:RegularExpressionValidator>
                    </td>
                </tr>
                <tr>
                    <td class="auto-style2">&nbsp;</td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td class="auto-style2">
                        <h2 class="subheader" style="font-size: large">Thông tin giao hàng</h2>
                    </td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td class="auto-style3">Họ tên</td>
                    <td class="auto-style4">
                        <asp:TextBox ID="txtHoTen" runat="server" Width="200px"></asp:TextBox>
                    
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="txtHoTen" ErrorMessage="Chưa nhập" ForeColor="Red">(*)</asp:RequiredFieldValidator>
                    
                    </td>
                </tr>
                <tr>
                    <td class="auto-style3">Địa chỉ </td>
                    <td class="auto-style4">
                        <asp:TextBox ID="txtDiaChi" runat="server" TextMode="MultiLine" Width="200px"></asp:TextBox>
                    
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="txtDiaChi" ErrorMessage="Chưa nhập" ForeColor="Red">(*)</asp:RequiredFieldValidator>
                    
                    </td>
                </tr>
                <tr>
                    <td class="auto-style3">Số điện thoại</td>
                    <td class="auto-style4">
                        <asp:TextBox ID="txtSDT" runat="server" Width="200px"></asp:TextBox>
                    
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="txtSDT" ErrorMessage="Chưa nhập" ForeColor="Red">(*)</asp:RequiredFieldValidator>
                    
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="txtSDT" ErrorMessage="Phải là số" ForeColor="Red" ValidationExpression="\d+">Phải là số</asp:RegularExpressionValidator>
                    </td>
                </tr>
                <tr>
                    <td class="auto-style6">Mã xác nhận</td>
                    <td class="auto-style7" style="font-size: large; vertical-align: bottom;">
                       
                         <%--<recaptcha:RecaptchaControl 
    ID = "recaptcha" 
    runat = "server" 
    PublicKey = "6Lf8jPESAAAAAM8MnY-lOZUXKAmhPuxQyFXouSqS" 
    PrivateKey = "6Lf8jPESAAAAAM-sfug-BvJEWzZ3l9gjZVxRT2wA" 
    />--%>
                       <%--<img src="Handler.ashx" id="imgCaptcha" />
<a href="#" onclick="javascript:RefreshCaptcha();">
     <asp:Image ID="Image1" runat="server" ImageUrl="~/refresh.png" />
                         
                         </a>--%>
                        
                        <asp:Image ID="imgCaptcha" runat="server" ImageUrl="Captcha.aspx" />
    <asp:ImageButton ID="imbReLoad" runat="server" ImageUrl="~/refresh.png" /><br />
                         <asp:TextBox runat="Server" ID="txtCaptcha" />
                         <br />
                         
                         </td>
                </tr>
                <tr>
                    <td class="auto-style6">&nbsp;</td>
                    <td class="auto-style7" style="font-size: large; vertical-align: bottom;">
                  <asp:Label ID="lblMessage" runat="server" ForeColor="Red"></asp:Label>  </td>
                </tr>
                <tr>
                    <td class="auto-style6">&nbsp;</td>
                    <td class="auto-style7" style="font-size: large; vertical-align: bottom;">
                        <asp:Button ID="btnDangKi" runat="server" BackColor="#0066FF" BorderColor="#00CCFF" Font-Size="Large" ForeColor="White" Height="42px" Text="Đăng Kí" Width="119px" OnClick="btnDangKi_Click" />
                        </td>
                </tr>
            </table>
        </div>
    </div>
    </div>
    </form>
</body>
</html>
